<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    
    <body>
        <div class="post">

            <h2 class="title">Cadastro de Usuario</h2>

            <h:panelGroup id="painelMensagens" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>

            <div id="stylized" class="myform">

                <h:form>
                    <h:outputLabel>Nome: <span class="small">Max 70 caracteres</span></h:outputLabel>
                    <h:inputText  value="#{UserController.user.nome}" required="true" requiredMessage="Nome requerido." />

                    <h:outputLabel>E-Mail: <span class="small">E-mail válido</span></h:outputLabel>
                    <h:inputText  value="#{UserController.user.email}" required="true" requiredMessage="Email requerido." />

                    <h:outputLabel>Login: <span class="small">Login de Usuário</span></h:outputLabel>
                    <h:inputText  value="#{UserController.user.login}" required="true" requiredMessage="Login requerido." />

                    <h:outputLabel>Ativo: <span class="small">Assinalado para ativo</span></h:outputLabel>
                    <h:selectBooleanCheckbox  value="#{UserController.user.ativo}" />


                    
                    <h:commandButton styleClass="button" action="#{UserController.persiste}" value="Salvar" />
                    <h:commandButton styleClass="button" type="reset" value="Limpar" />

                </h:form>
            </div>
        </div>




    </body>
</html>
